import request from '@/utils/request'

// 查询题目选项列表
export function listQuestionOption(query) {
  return request({
    url: '/exam/questionOption/list',
    method: 'get',
    params: query
  })
}

// 查询题目选项所有列表
export function listAllQuestionOption(query) {
  return request({
    url: '/exam/questionOption/listAll',
    method: 'get',
    params: query
  })
}

// 查询题目选项详细
export function getQuestionOption(optionId) {
  return request({
    url: '/exam/questionOption/getInfo/' + optionId,
    method: 'get'
  })
}

// 新增题目选项
export function addQuestionOption(data) {
  return request({
    url: '/exam/questionOption/add',
    method: 'post',
    data: data
  })
}

// 修改题目选项
export function updateQuestionOption(data) {
  return request({
    url: '/exam/questionOption/edit',
    method: 'post',
    data: data
  })
}

// 删除题目选项
export function delQuestionOption(optionId) {
  return request({
    url: '/exam/questionOption/remove/' + optionId,
    method: 'get'
  })
}
